import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '预约人数',
    align:"center",
    dataIndex: 'applyNum'
   },
   {
    title: '取消时间',
    align:"center",
    dataIndex: 'cancelTime'
   },
   {
    title: '预约状态',
    align:"center",
    dataIndex: 'applyState_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '预约人数',
    field: 'applyNum',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入预约人数!'},
          ];
     },
  },
  {
    label: '取消时间',
    field: 'cancelTime',
    component: 'Input',
  },
  {
    label: '预约状态',
    field: 'applyState',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"public_apply_state"
     }
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入预约状态!'},
          ];
     },
  },
];
